G_BEGIN_DECLS
-#ifndef OSTREE_WITH_AUTOCLEANUPS
-#define OSTREE_WITH_AUTOCLEANUPS 0
-#endif
-
/* ostree can use g_autoptr backports from libglnx when glib is too
* old, but still avoid exposing them to users that also have an old
* glib */
-#if defined(OSTREE_COMPILATION) || (OSTREE_WITH_AUTOCLEANUPS && GLIB_CHECK_VERSION(2, 44, 0))
+#if defined(OSTREE_COMPILATION) || GLIB_CHECK_VERSION(2, 44, 0)
/*
* The following types have no specific clear/free/unref functions, so
ot_remote_builtin_add_cookie (int argc, char **argv, GCancellable *cancellable, GError **error)
{
g_autoptr(GOptionContext) context = NULL;
- glnx_unref_object OstreeRepo *repo = NULL;
+ g_autoptr(OstreeRepo) repo = NULL;
const char *remote_name;
const char *domain;
const char *path;
ot_remote_builtin_add (int argc, char **argv, GCancellable *cancellable, GError **error)
{
g_autoptr(GOptionContext) context = NULL;
- glnx_unref_object OstreeRepo *repo = NULL;
+ g_autoptr(OstreeRepo) repo = NULL;
const char *remote_name;
const char *remote_url;
char **iter;
ot_remote_builtin_delete_cookie (int argc, char **argv, GCancellable *cancellable, GError **error)
{
g_autoptr(GOptionContext) context = NULL;
- glnx_unref_object OstreeRepo *repo = NULL;
+ g_autoptr(OstreeRepo) repo = NULL;
const char *remote_name;
const char *domain;
const char *path;
ot_remote_builtin_delete (int argc, char **argv, GCancellable *cancellable, GError **error)
{
g_autoptr(GOptionContext) context = NULL;
- glnx_unref_object OstreeRepo *repo = NULL;
+ g_autoptr(OstreeRepo) repo = NULL;
const char *remote_name;
gboolean ret = FALSE;
ot_remote_builtin_gpg_import (int argc, char **argv, GCancellable *cancellable, GError **error)
{
g_autoptr(GOptionContext) context = NULL;
- glnx_unref_object OstreeRepo *repo = NULL;
+ g_autoptr(OstreeRepo) repo = NULL;
g_autoptr(GInputStream) source_stream = NULL;
const char *remote_name;
const char * const *key_ids;
ot_remote_builtin_list_cookies (int argc, char **argv, GCancellable *cancellable, GError **error)
{
g_autoptr(GOptionContext) context = NULL;
- glnx_unref_object OstreeRepo *repo = NULL;
+ g_autoptr(OstreeRepo) repo = NULL;
const char *remote_name;
g_autofree char *jar_path = NULL;
g_autofree char *cookie_file = NULL;
ot_remote_builtin_list (int argc, char **argv, GCancellable *cancellable, GError **error)
{
g_autoptr(GOptionContext) context = NULL;
- glnx_unref_object OstreeRepo *repo = NULL;
+ g_autoptr(OstreeRepo) repo = NULL;
g_auto(GStrv) remotes = NULL;
guint ii, n_remotes = 0;
gboolean ret = FALSE;
ot_remote_builtin_refs (int argc, char **argv, GCancellable *cancellable, GError **error)
{
g_autoptr(GOptionContext) context = NULL;
- glnx_unref_object OstreeRepo *repo = NULL;
+ g_autoptr(OstreeRepo) repo = NULL;
const char *remote_name;
gboolean ret = FALSE;
g_autoptr(GHashTable) refs = NULL;
ot_remote_builtin_show_url (int argc, char **argv, GCancellable *cancellable, GError **error)
{
g_autoptr(GOptionContext) context = NULL;
- glnx_unref_object OstreeRepo *repo = NULL;
+ g_autoptr(OstreeRepo) repo = NULL;
const char *remote_name;
g_autofree char *remote_url = NULL;
gboolean ret = FALSE;
ot_remote_builtin_summary (int argc, char **argv, GCancellable *cancellable, GError **error)
{
g_autoptr(GOptionContext) context = NULL;
- glnx_unref_object OstreeRepo *repo = NULL;
+ g_autoptr(OstreeRepo) repo = NULL;
const char *remote_name;
g_autoptr(GBytes) summary_bytes = NULL;
g_autoptr(GBytes) signature_bytes = NULL;